package org.dromara.exam.domain.bo;

import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.exam.domain.entity.ExamTemplate;
import org.dromara.exam.domain.dto.TemplateSchema;

import java.math.BigDecimal;

/**
 * 题目业务对象 exam_question
 *
 * @author xiyin321
 * @date 2024-04-11
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = ExamTemplate.class, reverseConvertGenerate = false)
public class ExamTemplateBo extends BaseEntity {

    /**
     * 题目ID
     */
    @NotNull(message = "题目ID不能为空", groups = {EditGroup.class})
    private Long templateId;

    /**
     * 题库ID
     */
    private Long repoId;

    /**
     * 题目类型
     */
    private TemplateSchema.QuestionType questionType;

    /**
     * 标签
     */
    private String[] tag;

    /**
     * 标签匹配模式
     * 0：部分匹配 1：全部匹配，
     */
    private int tagMatchMode;

    /**
     * 显示顺序
     */
    private Long orderNum;

    private String order;

    /**
     * 题目标题
     */
    private String templateName;

    /**
     * 题目模板
     */
    private TemplateSchema template;

    /**
     * 答案
     */
    private String answer;

    /**
     * 分值
     */
    private BigDecimal score;

    /**
     * 备注信息
     */
    private String remark;

}
